﻿<?php    
header('Content-type: application/xls');
//$tenfile='sdthuoc'.date('Y-m-d_h-m-s').'.xls';
$tenfile='nongho_of_dp'.$nonghos['Nongho']['ap_id'].'.xls';
header("Content-Disposition:attachment;filename=$tenfile");

?>
<div class="view">
<h2><?php __('Quản lý nông hộ');?></h2>
<p>
<?php
$paginator->options(array('url'=>$this->passedArgs));
echo $paginator->counter(array(
'format' =>'Hiện có %count% mẫu tin'
));
?></p>
<table cellpadding="0" cellspacing="0" border="1">
<tr>	
	<th><?php echo $paginator->sort('Tên nông hộ', 'Nongho.TEN_NH');?></th>
	<th><?php echo $paginator->sort('Số nhà', 'Nongho.SONHA');?></th>
	<th><?php echo $paginator->sort('Tên âp', 'ApKv.TEN_AKV');?></th>
	<th><?php echo $paginator->sort('Số điện thoại', 'Nongho.SODT');?></th>
	<th><?php echo 'Ghi chú';?></th>

</tr>
<?php
$i = 0;
foreach ($nonghos as $nongho):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td>
			<p align="left"><?php echo $nongho['Nongho']['TEN_NH']; ?></p>
		</td>
		<td>
			<p align="left"><?php echo $nongho['Nongho']['SONHA']; ?></p>
		</td>
		<td>
			<p align="left"><?php echo $nongho['ApKv']['TEN_AKV']; ?></p>
		</td>
		<td>
			<?php echo $nongho['Nongho']['SODT']; ?>
		</td>
		<td>
			<p align="left"><?php echo $nongho['Nongho']['GHICHU_NH']; ?></p>
		</td>
	
	</tr>
<?php endforeach; ?>
</table>
